package org.westboy.model;

import javafx.beans.property.*;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;


public class OrderPro {


    private StringProperty name;

    private ImageView pic;

    private FloatProperty price;

    private IntegerProperty num;

    public OrderPro(){
        name = new SimpleStringProperty();
        pic = new ImageView();
        pic.setFitWidth(80);
        pic.setFitHeight(80);
        price = new SimpleFloatProperty();
        num = new SimpleIntegerProperty();
    }

    public String getName() {
        return name.get();
    }

    public StringProperty nameProperty() {
        return name;
    }

    public void setName(String name) {
        this.name.set(name);
    }

    public ImageView getPic() {
        return pic;
    }

    public void setPic(String pic) {
       Image image = new Image(pic);
        this.pic.setImage(image);
    }

    public float getPrice() {
        return price.get();
    }

    public FloatProperty priceProperty() {
        return price;
    }

    public void setPrice(float price) {
        this.price.set(price);
    }

    public int getNum() {
        return num.get();
    }

    public IntegerProperty numProperty() {
        return num;
    }

    public void setNum(int num) {
        this.num.set(num);
    }
}
